# 4.2列表的遍历和排序  4.2.1列表的遍历
list_one = ['小明','小红','小花','小丽']
print("今日促销通知!!!")
for i in list_one:
    print(f"您好，{i}！今日商店大促销，赶紧来抢购吧！")

# 4.2.2 列表的排序
# 1.sort()方法
# sort(key=None, reversed=False)
li_one = [6,2,5,3]
li_two = [7,3,5,4]
li_three = ['python','Java','PHP']
li_one.sort()
li_two.sort(reverse=True)
li_three.sort(key=len)
print(li_one)
print(li_two)
print(li_three)

# 3.reverse()方法
li_one = ['a','b','c','d']
li_one.reverse()
print(li_one)
